<template>
  <div class="page-wrap">
    <router-view v-slot="{ Component }">
      <keep-alive include="list,my-find-list,discover">
        <component :is="Component" />
      </keep-alive>
    </router-view>
  </div>
  <van-tabbar route v-if="Tabbarpage.includes($route.name)">
    <van-tabbar-item replace to="/list" icon="eye-o">发现</van-tabbar-item>
    <van-tabbar-item replace to="/discover" icon="home-o">论坛</van-tabbar-item>
    <van-tabbar-item replace to="/user" icon="user-o">我的</van-tabbar-item>
  </van-tabbar>
</template>

<script>
import { Tabbar, TabbarItem } from "vant";
export default {
  components: {
    [Tabbar.name]: Tabbar,
    [TabbarItem.name]: TabbarItem,
  },
  setup() {
    const Tabbarpage = ['list', 'discover', 'user']
    return {
      Tabbarpage,
    }
  }
};
</script>
<style lang="less" scoped>
.page-wrap {
  min-height: 100vh;
  background: #efefef;
}
</style>
